import VueRouter from 'vue-router'

//引入组件
import ShouYeComponent from '../pages/index.vue'
import AdminComponent from '../pages/admin.vue'
import UserListComponent from '../components/UserList.vue'
import UpdateMassage from '../pages/UpdateMassage.vue'
import addNews from "@/pages/addNews";
import EditorVue from '../components/editorVue.vue'
import CategoryComponent from '../components/categoryManage.vue'
import PublicWorksSection from '../components/PublicWorksSection.vue'
import ManuComponent from '@/pages/manu.vue'
import MassagesComponent from '@/components/allMassage.vue'
import FileManageComponent from "@/pages/FileManageComponent"
import fileManage from "@/pages/FileManage"
import NewsComponent from "@/pages/news.vue";
import NoticeComponent from "@/pages/notice.vue";
import InformationComponent from "@/pages/information.vue";
import NewsDetail from "@/pages/newsDetail.vue";

import fhdd from "@/components/e/fhdd";
import fhya from "@/components/f/fhya";
import shyxb from "@/components/k/shyxb";
import shfx from "@/components/l/shfx";
import zxsq from "@/components/m/zxsq";
import dxal from "@/components/n/dxal";
import ldjh from "@/components/o/ldjh";
import fhwj from "@/components/c/fhwj";
import fhbl from "@/components/p/fhbl";
import yhpc from "@/components/q/yhpc";
import dyhgl from "@/components/r/dyhgl";
import sksx from "@/components/a/sksx";
import yljjz from "@/components/j/yljjz";
import fhrbjb from "@/components/i/fhrjb";
import login from "@/login/index.vue";
import fhfg from "@/components/g/fhfg";
import fhkj from "@/components/h/fhkj";
import xqzb from "@/components/d/xqzb";
import fhyb from "@/components/b/fhyb";
import zysxt from "@/components/s/zysxt";

import SearchPage from "@/pages/searchPage";

import newsItems from "@/components/contentone/newsItems";

//创建并暴露一个路由器
export default new VueRouter({
    routes: [
        {
            path: '/',
            component: ShouYeComponent,
            name: 'shouye',
            children: [
            	{
            		path: '/newsItem',
            		component: newsItems
            	}]

        },
        {
            path: '/admin',
            component: AdminComponent,
            meta: {
                // requiresAuth: true
            },
            children: [
                {
                    path: '/userList',
                    component: UserListComponent,
                    meta: {
                        requiresAuth: true
                    },
                },
                {
                    path: '/editor',
                    component: EditorVue,
                    meta: {
                        requiresAuth: true
                    },
                },
                {
                    path: '/category',
                    component: CategoryComponent,
                    meta: {
                        requiresAuth: true
                    },
                },
                {
                    path: '/publicWorksSection',
                    component: PublicWorksSection,
                    meta: {
                        requiresAuth: true
                    },
                },
                {
                    path: '/manu',
                    component: ManuComponent,
                    children: [
                        {
                            path: '/allMessages',
                            component: MassagesComponent,
                            meta: {
                                requiresAuth: true
                            },
                            children: [
                                {
                                    path: '/addText',
                                    component: addNews,
                                    meta: {
                                        requiresAuth: true
                                    },
                                },
                                {
                                    path: '/updateText',
                                    component: UpdateMassage,
                                    meta: {
                                        requiresAuth: true
                                    },
                                }
                            ]
                        }
                    ]
                },
                {
                    path: '/filemanage',
                    component: fileManage,
                    meta: {
                        requiresAuth: true
                    },
                    children: [
                        {
                            path: '/filemanageComponent',
                            component: FileManageComponent,
                            meta: {
                                requiresAuth: true
                            },
                        },
                    ]
                }
            ]
        },
        {
            path: '/fhwj',
            component: fhwj
        }, {
            path: "/shyxb",
            component: shyxb
        },
        {
            path: '/dyhgl',
            component: dyhgl
        },
        {
            path: '/zxsq',
            component: zxsq
        },
        {
            path: '/fhya',
            component: fhya
        },
        {
            path: '/fhdd',
            component: fhdd
        },
        {
            path: '/yhpc',
            component: yhpc
        },
        {
            path: '/sksx',
            component: sksx
        },
        {
            path: '/yljjz',
            component: yljjz
        }, {
            path: '/shfx',
            component: shfx
        },
        {
            path: '/fhbl',
            component: fhbl
        },
        {
            path: '/ldjh',
            component: ldjh
        },
        {
            path: '/fhfg',
            component: fhfg
        },
        {
            path: '/fhwj',
            component: fhwj
        },
        {
            path: '/fhkj',
            component: fhkj
        },
        {
            path: '/dxal',
            component: dxal
        },
        {
            path: '/fhrbjb',
            component: fhrbjb
        },
        {
            path: '/xqzb',
            component: xqzb
        },
        {
            path: '/fhyb',
            component: fhyb
        },
        {
            path: '/zysxt',
            component: zysxt
        },
        {
            path: '/news',
            name: 'news',
            component: NewsComponent
        },
        {
            path: '/notice',
            name: 'notice',
            component: NoticeComponent
        },
        {
            path: '/information',
            name: 'information',
            component: InformationComponent
        },
        {
            path: '/login',
            component: login
        },
        {
            path: '/newsDetail',
            name: 'newsDetail',
            component: NewsDetail
        },
        {
            path:'/searchPage',
            name:'searchPage',
            component:SearchPage
        }

    ]
})
